package com.glw.sso.platform.common.exception;

import com.glw.sso.platform.common.annotation.ErrorMessage;
import com.glw.sso.platform.common.constant.GlobalResponseNo;

/**
 * @ClassName SystemException
 * @Version v1.0
 */
public class SystemException extends BaseException {

    public static class Code {

        @ErrorMessage("系统异常")
        public static final int SYSTEM_ERROR = GlobalResponseNo.SYSTEM_ERROR;

        @ErrorMessage("未登录")
        public static final int UN_LOGIN = GlobalResponseNo.UN_LOGIN;

    }

    public SystemException(int code, Object... args) {
        super(code, args);
    }

    public static SystemException create(int code, Object... args) {
        return new SystemException(code, args);
    }

    @Override
    public Class getCodeClass() {
        return SystemException.Code.class;
    }
}
